package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLGraphics;
import HLLib.game.HLCameraScaled;
import HLLib.game.HLSprite;

public class HLClassCameraScaled extends HLLibClass {
    public HLClassCameraScaled(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLCameraScaled();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLCameraScaled) self).SetScale(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).IsSpriteOut((HLSprite)args.GetObject(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLCameraScaled) self).IsSpriteOut((HLSprite)args.GetObject(0)));
            }
            break;
        }
        case 2: {
            ((HLCameraScaled) self).SetPosOfScreen(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 3: {
            ((HLCameraScaled) self).MoveOfScreen(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 4: {
            ((HLCameraScaled) self).RefreshRealPos();
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).WorldXToScreen(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLCameraScaled) self).WorldXToScreen(args.GetInt(0)));
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).WorldYToScreen(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLCameraScaled) self).WorldYToScreen(args.GetInt(0)));
            }
            break;
        }
        case 7: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).ScreenXToWorld(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLCameraScaled) self).ScreenXToWorld(args.GetInt(0)));
            }
            break;
        }
        case 8: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).ScreenYToWorld(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLCameraScaled) self).ScreenYToWorld(args.GetInt(0)));
            }
            break;
        }
        case 9: {
            ((HLCameraScaled) self).SetSize(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 10: {
            ((HLCameraScaled) self).SetPos(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 11: {
            ((HLCameraScaled) self).Move(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 12: {
            ((HLCameraScaled) self).SetCenter(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 13: {
            ((HLCameraScaled) self).SetCenterBufferEX(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 14: {
            ((HLCameraScaled) self).SetCenterBuffer(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            break;
        }
        case 15: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).CenterX();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLCameraScaled) self).CenterX());
            }
            break;
        }
        case 16: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).CenterY();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLCameraScaled) self).CenterY());
            }
            break;
        }
        case 17: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).IsOnPos(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLCameraScaled) self).IsOnPos(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 18: {
            if (resultOwnerObject == null) {
                ((HLCameraScaled) self).IsOnCenter(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLCameraScaled) self).IsOnCenter(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 19: {
            ((HLCameraScaled) self).RenderEx((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1));
            break;
        }
        case 20: {
            ((HLCameraScaled) self).Render((HLGraphics)args.GetObject(0));
            break;
        }
        case 21: {
            ((HLCameraScaled) self).StartShake(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        }
    }
}
